<?php
/** 
 * EGP Framework
 *
 * LICENSE
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author     Akon(番茄红了) <aultoale@gmail.com>
 * @copyright  Copyright (c) 2008 (http://www.tblog.com.cn)
 * @license    http://www.gnu.org/licenses/gpl.html     GPL 3
 */

!defined('EGP_LIB_DIR') && die('Access Deny!');

/**
 * 支付方式配置文件
 *
 * @package    config
 * @author     Akon(番茄红了) <aultoale@gmail.com>
 * @copyright  Copyright (c) 2008 (http://www.tblog.com.cn)
 * @license    http://www.gnu.org/licenses/gpl.html     GPL 3
 */
return array(
    /***************************************************************************
     * 财付通 (即时到账)
     **************************************************************************/
    'tenpay' => array(
        'cmdno'        => 1, //业务代码 (1:支付接口/2:查询接口)
        'date'         => date('Ymd'), //交易日期
        'bank_type'    => 0, //银行类型 (财付通支付填0)
        'bargainor_id' => '0000000000', //商家的商户号
        'fee_type'     => 1, //现金支付币种
        'return_url'   => 'http://www.egp.foo/payment/respond/adapter/tenpay', //支付响应 URL
        'attach'       => 'egp', //商家数据包
        'key'          => '', //商户密钥
    ),
    /***************************************************************************
     * 财付通 (中介担保)
     **************************************************************************/
    'tenpay_mediate' => array(
        'cmdno'          => 12, //任务代码 (取定值 12)
        'encode_type'    => 1, //编码类型 (1:GB2312编码/2:UTF-8编码)
        'chnid'          => 'xxxx@mail.com', //平台提供者的财付通账号
        'seller'         => 'xxxx@mail.com', //收款方财付通账号
        'mch_desc'       => 'egp.foo 购物订单', //交易说明 (不能包含 <>'"% 特殊字符)
        'mch_type'       => 1, //交易类型 (1:实物交易/2:虚拟交易)
        'mch_returl'     => 'http://www.egp.foo/payment/notify/adapter/tenpay_mediate', //支付响应 URL
        'transport_desc' => '无物流信息', //物流公司或物流方式说明
        'transport_fee'  => 0, //需买方另支付的物流费用 (单位为分)
        'need_buyerinfo' => 2, //是否需要在财付通填定物流信息 (1:需要/2:不需要)
        'show_url'       => 'http://www.egp.foo/payment/notify/adapter/tenpay_mediate', //支付后的商户支付结果展示页面
        'attach'         => 'egp', //商家数据包
        'key'            => '', //商家密钥
    ),
    /***************************************************************************
     * 支付宝
     **************************************************************************/
    'alipay' => array(
        '_input_charset'    => 'utf-8', //参数编码字符集
        'security_code'     => '', //交易安全校验码
        'service'           => 'trade_create_by_buyer', //接口名称
        'partner'           => '0000000000000000', //合作伙伴 ID
        'notify_url'        => 'http://www.egp.foo/payment/notify/adapter/alipay', //状态通知 URL
        'return_url'        => 'http://www.egp.foo/payment/respond/adapter/alipay', //支付响应 URL
        'agent'             => null, //代理商 ID
        'sign_type'         => 'MD5', //设定签名加密方式
        'logistics_type'    => 'EXPRESS', //物流类型 (VIRTUAL:虚拟物品/POST:平邮/EMS/EXPRESS:其他快递公司)
        'logistics_fee'     => 0, //物流费用
        'logistics_payment' => 'BUYER_PAY_AFTER_RECEIVE', //物流支付方式 (SELLER_PAY:卖家支付/BUYER_PAY:买家支付/BUYER_PAY_AFTER_RECEIVE:货到付款)
        'seller_email'      => 'xxxx@mail.com', //卖家的支付宝注册 Email
        'seller_id'         => null, //卖家的支付宝注册 ID
    ),
);
